package kr.hkit.androidcomplete02.ch13;

import kr.hyunist.androidcomplete01.*;
import android.app.*;
import android.os.*;
import android.widget.*;

public class CalendarViewEx extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch13_calendarview);
		
		CalendarView calendar = (CalendarView) findViewById(R.id.ch13_cv_calendar);
		calendar.setOnDateChangeListener(new CalendarView.OnDateChangeListener() {
			
			@Override
			public void onSelectedDayChange(CalendarView view, int year, int month,
					int dayOfMonth) {
				
				Toast.makeText(CalendarViewEx.this, "" + year + "/" + (month + 1) + "/" + dayOfMonth, 0).show();
				
			}
		});
	}
}
